package EveryDayPractice;

public class Practice21 {
     public static void main(String[] args) {
         int sum=0;
         for (int i = 1; i <= 20; i++) {
             int a=1;
             for (int j = 1; j <= i; j++) {
                 a=a*j;
             }
             sum=sum+a;
             System.out.println(a);
         }
         System.out.println(sum);
     }
}
